package chap5.Task;
public class Task12 {
    public static void main(String[] args) {
        int[] a = {2, 3, 5, 8, 9, 6, 7, 10, 11, 11, 12};
        int sum = 0;
        int i;
        for (i = 0; i < a.length; i++) {
            sum += a[i];
        }
        System.out.println("平均值为" + 1.0 * sum / a.length + "，输出比平均值大的数");
        for (i = 0; i < a.length; i++) {
            if (a[i] > 1.0 * sum / a.length)
                System.out.print(a[i] + " ");
        }

    }
}
